import HomePage from '../pages/HomePage.vue'
import DiscoveryPage from '../pages/DiscoveryPage.vue'
import UserPage from '../pages/user/UserPage.vue'
import ACCESS_ENUM from '@/access/accessEnum'

const routes = [
  { path: '/', title: '主页', component: HomePage, icon: 'home-o', name: 'HomePage' },
  { path: '/discovery', title: '发现', component: DiscoveryPage, icon: 'search', name: 'DiscoveryPage' },
  { path: '/user', title: '个人', component: UserPage, icon: 'friends-o', name: 'UserPage' },
  {
    path: '/adminPage',
    title: '管理员',
    component: () => import('@/pages/AdminPage'),
    icon: 'user-o',
    name: 'AdminPage',
    meta: {
      access: ACCESS_ENUM.ADMIN,
    },
  },
  {
    path: '/user/login',
    title: '用户登录',
    component: () => import('@/pages/user/UserLoginPage'),
    meta: {
      hideInMenu: true,
    },
  },
  {
    path: '/user/register',
    title: '用户注册',
    component: () => import('@/pages/user/UserRegisterPage'),
    meta: {
      hideInMenu: true,
    },
  },
]

export default routes
